//引入封装方法
import http from "@/utils/request";
 
// 获取验证码
export const getCode = async (data:any) => {
	return http.post<any>(`/member/auth/send-sms-code`, data)
}

// 验证码登录
export const smsLogin = async (data:any) => {
	return http.post<any>(`/member/auth/sms-login`, data)
}

// 获取会员个人信息
export const getInfo = async () => {
	return http.get<any>(`/member/user/get`, {})
}

// 获取会员个人信息
export const userEdit = async (data:any) => {
	return http.post<any>(`/member/user/edit`, data)
}

// 手机一键登录
export const phoneLogin = async (phone:any,code:any) => {
	return http.post<any>(`/member/auth/phone-login?mobile=${phone}&code=${code}`, {})
}

// 手机一键登录 获取code
export const getPhoneCode = async () => {
	return http.get<any>(`/member/auth/get-phone-code`, {})
}

// 刷新令牌
export const refreshToken = async (data:any) => {
	return http.post<any>(`/member/auth/refresh-token`, data)
}

// 账户注销
export const getLogout = async (data:any) => {
	return http.post<any>(`/member/user/member-update-state`, data)
}
// 获取租户列表
export const getTenantData = async (data: any) => {
    return http.get<any[]>(`/system/tenant/page`, data); 
}


